<?php
	class auth_controller extends Controller
	{		
		public function init()
		{
			#code that gets called all the time goes here
			$this->view->title = 'Authentication Manager';
		}
		
		public function index_action()
		{
			return;
		}	
		
		public function login_action()
		{
			$results = $this->user->authorize( $this->post['email'], $this->post['password'], $this->session->session_id );
		
			$this->redirect( $_SERVER['HTTP_REFERER'] );
		}
		
		public function logout_action()
		{
			$this->user->deauthorize();
			$this->session->end();
			
			$this->redirect( $_SERVER['HTTP_REFERER'] );
		}
	}
?>